package org.blog.dao;

import org.apache.ibatis.annotations.Mapper;
import org.blog.entity.Article;
import org.blog.entity.param.ArticleParam;
import org.blog.entity.vo.ArticleVO;
import org.blog.entity.vo.NewArticleVO;

import java.util.List;
import java.util.Map;

@Mapper
public interface ArticleMapper {
    int deleteByPrimaryKey(Integer articleId);

    int insert(Article record);

    int insertSelective(Article record);

    Article selectByPrimaryKey(Integer articleId);

    int updateByPrimaryKeySelective(Article record);

    int updateByPrimaryKeyWithBLOBs(Article record);

    int updateByPrimaryKey(Article record);

    List<Article> getHotArticles(Integer articlesLimit);

    List<Article> getArticles(Map<String, Object> map);

    List<NewArticleVO> getNewArticles(Integer articlesLimit);

    ArticleVO getArticleVOByArticleId(Integer articleId);

    int addViewNum(Integer articleId);

    List<ArticleVO> getArticleVO(Map<String, Object> convertBeanToMap);
}